from django.conf.urls import patterns, include, url
from django.views.generic.base import RedirectView

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
from django.conf import settings

admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'avicaz.views.home', name='home'),
    # url(r'^avicaz/', include('avicaz.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    url(r'^admin/', include(admin.site.urls)),
    
    # HOME, CONTACT
    url(r'^', include('apps.home.urls')),
    
    # BLOG
    url(r'^blog/', include('apps.blog.urls')),
    
    url(r'^media/(?P<path>.*)$', 'django.views.static.serve',
        {'document_root': settings.MEDIA_ROOT,}),
    
    # CATALOG
    url(r'^catalog/', include('apps.catalog.urls')),
    
    # ARTICLES
    url(r'^articles', include('apps.articles.urls')),
    
    # DJANGO-SOCIAL-AUTH
    url(r'', include('social_auth.urls')),
    url(r'^login/$', RedirectView.as_view(url="/accounts/login/facebook")),
    
)